package com.car.loan.project.xr.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.car.loan.framework.web.domain.AjaxResult;
import com.car.loan.project.xr.domain.Loan;
import com.car.loan.project.xr.util.bo.business.LoanBaseInfo;
import com.car.loan.project.xr.util.bo.business.LoanBo;
import com.car.loan.project.xr.util.bo.business.LoanUpdateBo;
import com.car.loan.project.xr.util.bo.business.modify.LoanModifyBo;
import com.car.loan.project.xr.util.bo.business.modify.LoanModifyPageParam;
import com.car.loan.project.xr.util.select.LoanBasePageParam;
import com.car.loan.project.xr.util.vo.BusinessAuditDetailVo;
import com.car.loan.project.xr.util.vo.BusinessAuditInfo;
import com.car.loan.project.xr.util.vo.BusinessDetailVo;
import com.car.loan.project.xr.util.vo.LoanApplyVo;
import com.car.loan.project.xr.util.vo.LoanContractAuditVo;
import com.car.loan.project.xr.util.vo.modify.LoanModifyDetail;
import java.util.Collection;
import java.util.List;

/**
 * 贷款Service接口
 *
 * @author ruoyi
 * @date 2019-11-03
 */
public interface ILoanService {

    /**
     * 查询贷款
     *
     * @param id 贷款ID
     * @return 贷款
     */
    public Loan selectLoanById(Long id);

    AjaxResult apply(LoanBo loanBo);

    AjaxResult audit(BusinessAuditInfo businessAuditInfo);

    AjaxResult apostilleAudit(BusinessAuditInfo businessAuditInfo);

    AjaxResult updateApply(LoanUpdateBo updateLoanBo);

    LoanApplyVo getLoanApplyVo(long loanId);

    BusinessAuditDetailVo getBusinessAuditDetailVo(long loanId);

    /**
     * 获取合同审核详情
     */
    LoanContractAuditVo getContractAuditDetail(long loanId);

    Page<LoanBaseInfo> page(LoanBasePageParam loanBasePageParam);

    Page<?> modifyPage(LoanModifyPageParam loanModifyPageParam);

    /**
     * 查询贷款列表
     *
     * @param loan 贷款
     * @return 贷款集合
     */
    public List<Loan> selectLoanList(Loan loan);

    /**
     * 查询分页数据
     */
    IPage<Loan> selectPage(IPage<Loan> page, QueryWrapper<Loan> queryWrapper);

    /**
     * 新增贷款
     *
     * @param loan 贷款
     * @return 结果
     */
    public int insertLoan(Loan loan);

    /**
     * 修改贷款
     *
     * @param loan 贷款
     * @return 结果
     */
    public int updateLoan(Loan loan);

    /**
     * 批量删除贷款
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteLoanByIds(Collection<Long> ids);

    /**
     * 删除贷款信息
     *
     * @param id 贷款ID
     * @return 结果
     */
    public int deleteLoanById(Long id);

    /**
     * 业务列表详情
     */
    BusinessDetailVo businessDetail(Long id);

    AjaxResult modifyBusiness(LoanModifyBo loanModifyBo);

    LoanModifyDetail getModifyDetail(Long id);

}
